package com.lagou.rpc.consumer.client.lb;

/**
 * @author xingyi
 */
public abstract class BaseLoadBalanceStrategy  {
    protected int clientSize;

    public void addClient() {
        clientSize++;
        afterClientChanged();
    }

    public void removeClient() {
        clientSize--;
        afterClientChanged();
    }

    public abstract int pickClientIndex();

    protected void afterClientChanged() {

    }
}
